-
Notifications
You must be signed in to change notification settings - Fork 428
Add missing catalog tests #2955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
tests/integration/test_catalog.py
Outdated
| # list_namespaces returns a list of tuples | ||
| if isinstance(test_catalog, RestCatalog): | ||
| namespaces = test_catalog.list_namespaces() | ||
| assert ("new",) in namespaces or ("new.db",) in namespaces | ||
| else: | ||
| assert namespace in test_catalog.list_namespaces() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you know why theres a behavior difference here?
ideally we're testing for consistent catalog behaviors in this class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling list namespaces would get you:
rest_catalog - new
others - new.db
That's because iceberg-rest-fixture treats this as hierarchical namespaces, which many other catalogs don't support. The spec supports hierarchical namespaces, so that seems to be working as intended.
My comment was very poor, so I wrote an actual comment to explain this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should tag the different catalogs with different feature sets (hierarchical namespaces, supports slashes, etc.) and then have the catalog tests base their behavior based off those tags
|
Nice! |
Fokko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @rambleraptor 🙌
I've merged #2972 Can you resolve the conflicts here?
89d316a to
4ed9cf8
Compare
|
@Fokko resolved the conflicts and changed the tests to use the new |
|
Thanks @rambleraptor, I'll leave the PR open for @kevinjqliu to merge since there are some open comments :) |
kevinjqliu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
| if isinstance(test_catalog, HiveCatalog): | ||
| pytest.skip("HiveCatalog raises NoSuchObjectException instead of NoSuchNamespaceError") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probably change HiveCatalog then 😄
Rationale for this change
There's a couple missing catalog tests around supporting namespaces + tables with slashes/dots. Along the way, I found an issue in how we create the CreateTableRequest + RegisterTableRequest
Are these changes tested?
Tests are included.
Are there any user-facing changes?